package com.lv.utils.restartTask;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author: Lv_sc
 * Date:     2021/3/24 15:25
 * Description: //当前任务伴随项目启动而启动
 */
@Component
@Order(value = 1)
public class StartService implements ApplicationRunner {
    @Autowired
    private ConfigTask configTask;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        //伴随服务一起启动
        configTask.start();
    }

}